﻿using ATEC.ATCore;
using ATEC.ATDataCoreNET;
using ATEC.ATDataCoreNET.ATObjects;
using ATEC.GeometryNET;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityExample
{
    public class DrawBody
    {
        public static void DrawBodyExample()
        {
            // 准备截面
            CurveSet pCircle = DrawCircleAndTransform.MakeCircle();
            CurveSet pCopy = DrawCircleAndTransform.TransformCircle(pCircle);
            List<CurveSet> listProfiles = new List<CurveSet> { pCircle, pCopy };

            // loft造体
            SolidCoreEntity pBody = null;
            SSDPNET.DataCore.EntityUtl.Create.EntityFromLoft(out pBody, listProfiles, null, Session.Entity.GetActiveATScenes(), false, false);

            //// 绘制到屏幕
            ATObject obj = GeometryToATObject.ToObject(Session.Entity.GetActiveATScenes(), pBody, null);
            if (obj.IsValid)
            {
                obj.AddToScene(); // 添加到 Scene
            }

            //ExampleElementProp prop;
            //prop.geo_prop = CurveSet::Create(CurveSet::BoundaryType::BOUNDARY_TYPE_None);
            //CreateCCLOnATObject(obj, prop);
        }
    }
}
